class Decorator(object):

    def __init__(self,x,y):
        self.x = x
        self.y = y

    def __call__(self, x,y):
        """
        Traceback (most recent call last):
          File "E:/WN15/Python/Code/Day13/demo04/Demo01.py", line 10, in <module>
            d(5,6)
        TypeError: 'Decorator' object is not callable
        正常情况下一个class的实例不是可调用对象.如果我们希望该实例可以被调用.则
        必须提供__call__方法.
        :param x:
        :param y:
        :return:
        """
        self.x = x
        self.y = y

d = Decorator(3,4)
print(d.x,d.y)
d(5,6) # 本质是调用Decorator类中的__call__方法.
print(d.x,d.y)